import 'package:auto_route/auto_route.dart';
import 'package:casdon/common/widget/common_app_bar.dart';
import 'package:casdon/common/widget/common_video_player.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

@RoutePage()
class VideoPlayerScreen extends ConsumerWidget {
  final String? title;
  final String url;

  const VideoPlayerScreen({super.key, this.title, required this.url});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return Scaffold(
      appBar: CommonAppBar(title: ''),
      body: SafeArea(
        child: Center(child: VideoPlayerWidget(source: NetworkSource(url))),
      ),
    );
  }
}
